# Replication Script for 
# "Coordinating Nominations: How to Deal with 
# an Incumbent Surplus after Electoral Reform"
# published in Japanese Journal of Political Science
# author: Jochen Rehmert

# Script replicates:
# Table: 5

# directory
setwd("...")

# packages 
library(foreign);library(stargazer)

# load data
dat <- read.dta("coordination5.dta")


################################################
# Table 5: Predicting Running in Next Election #
################################################

summary(m <- glm(runt1 ~ as.factor(year) + age + inc + totcwins, data = dat))

# table
stargazer(m, 
          omit = "year",
          covariate.labels = c("Age", "Incumbent", "Seniority"),
          add.lines = list(c("Election Fixed-Effects","Yes"),
                           c("Number of Candidates",length(unique(dat$pid)) )))
# coefficient sizes and N differ from the ones presented 
# in the article which was run on all conservatives candidates;
# the findings are effectively the same, however

